from django.urls import path
from rest_framework.routers import DefaultRouter

from users.views import ImageVerifyView, UserViewSet, MyTokenObtainPairView, AreaViewSet, AddressViewSet
from rest_framework_simplejwt.views import TokenObtainPairView
urlpatterns = [
    path('verification/<str:func>/<uuid:uuid>/', ImageVerifyView.as_view()),
    path('login/',MyTokenObtainPairView.as_view())
]

# 创建路由器
router = DefaultRouter()
router.register("users", UserViewSet)
router.register("area", AreaViewSet)
router.register("address", AddressViewSet)
urlpatterns += router.urls
